package com.ssm.controller;

import com.ssm.pojo.Scenery;
import com.ssm.service.SceneryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class SceneryController {

    @Autowired
    private SceneryService sceneryService;

    @RequestMapping("getListScenery.html")
    public String getScenery(Model model){
        List<Scenery> sceneryList = sceneryService.getScenery();
        model.addAttribute("list",sceneryList);
        return "leading/scenery";
    }

//    @RequestMapping("getListScenery.html")
//    public String getListScenery(Model model){
//        List<Scenery> sceneryList = sceneryService.getSceneryById();
//        model.addAttribute("list",sceneryList);
//        return "leading/scenery";
//    }
}
